const express = require('express')
const bodyParser = require('body-parser')
const mongan = require('morgan')
const {sequelize}=require('./model/index')

const app = express()
app.use(bodyParser.json())
app.use(mongan('combined'))
require('./router')(app)


// sequelize.sync({force:true}).then(async ()=>{
//     const User=sequelize.db.User
//     const jane = await User.create({ name: "Jane" });
// }).catch((error)=>{
//     console.log('Connection error')
// })
app.listen(3000, () => console.log('Server has been start on port 3000'));
